package com.tongqu.service.serviceimpl;

import com.tongqu.mapper.TableDao;
import com.tongqu.protocol.TestUser;
import com.tongqu.service.TableService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
import java.util.List;

@Service
@Transactional
public class TableServiceImpl implements TableService {
    @Autowired
    private TableDao tableDao;

    @Override
    public List<String> findAllTables() {
        return tableDao.findAllTables();
    }

    @Override
    public boolean dropTable(String table) {
        return tableDao.dropTable(table) > 0;
    }

    @Override
    public Date getCreateTableTime(String table) {
        return tableDao.getCreateTableTime(table);
    }

}
